﻿using System.Collections;
using System.Collections.Generic;
using Workflow.Dto;
using Workflow.Model;

namespace Workflow.IService
{
    /// <summary>
    /// 用户管理
    /// </summary>
    public interface IUserManager
    {
    	/// <summary>
    	/// 获取用户
    	/// </summary>
    	/// <param name="userId">用户ID</param>
    	/// <returns></returns>
		User GetUser(long userId);

    	/// <summary>
    	/// 所有User取得（分页）
    	/// </summary>
    	IList<User> GetUsersByPage(out long count, int pageIndex, int pageSize, UserQueryDto userQueryDto);

    	/// <summary>
    	/// save user
    	/// </summary>
    	/// <param name="user"></param>
    	/// <returns></returns>
    	void SaveOrUpdateUser(User user);

    	/// <summary>
    	/// DeleteUser
    	/// </summary>
    	/// <param name="userId"></param>
    	void DeleteUser(string userId);

    	/// <summary>
    	/// GetAllUser
    	/// </summary>
    	IList<User> GetAllUser();
        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="username"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        UserQueryDto UserLogin(long username, string password);

    	/// <summary>
    	/// 通过权限取得对应的用户
    	/// </summary>
    	IList<User> GetUserForRole(int role);
    }
}
